<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns="urn:schemas-microsoft-com:PAG:updater-application-block:v2:manifest" elementFormDefault="qualified" targetNamespace="urn:schemas-microsoft-com:PAG:updater-application-block:v2:manifest" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="manifest" nillable="true" type="Manifest" />
  <xs:complexType name="Manifest">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="description" type="xs:string" />
      <xs:element minOccurs="1" maxOccurs="1" name="application" type="ManifestApplication" />
      <xs:element minOccurs="0" maxOccurs="1" name="files" type="ManifestFiles" />
      <xs:element minOccurs="0" maxOccurs="1" name="downloader" type="ManifestDownloaderProviderData" />
      <xs:element minOccurs="0" maxOccurs="1" name="activation" type="ActivationProcess" />
      <xs:element minOccurs="0" maxOccurs="1" name="includedManifests" type="includedManifests" />
      <xs:element name="preDownloadConditions" type="ConditionEvaluation" />
      <xs:element name="installConditions" type="ConditionEvaluation" />
    </xs:sequence>
    <xs:attribute name="manifestId" type="xs:string" use="required" />
    <xs:attribute name="mandatory" type="YesNoBoolType" use="required" />
  </xs:complexType>
  <xs:complexType name="ManifestApplication">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="entryPoint" type="EntryPoint" />
      <xs:element minOccurs="1" maxOccurs="1" name="location" type="xs:string" />
      <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="1" />
    </xs:sequence>
    <xs:attribute name="applicationId" type="xs:string" use="required" />
    <xs:anyAttribute namespace="##other" processContents="lax" />
  </xs:complexType>
  <xs:complexType name="EntryPoint">
    <xs:attribute name="file" type="xs:string" />
    <xs:attribute name="parameters" type="xs:string" />
  </xs:complexType>
  <xs:complexType name="ManifestFiles">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="file" type="ManifestFile" />
    </xs:sequence>
    <xs:attribute name="base" type="xs:string" />
    <xs:attribute name="hashComparison" type="YesNoBoolType" use="optional" default="No" />
    <xs:attribute name="hashProvider" type="xs:string" use="optional" />
  </xs:complexType>
  <xs:complexType name="ManifestFile">
    <xs:sequence />
    <xs:attribute name="source" type="xs:string" use="required" />
    <xs:attribute name="transient" type="YesNoBoolType" default="No" use="optional" />
    <xs:attribute name="hash" type="xs:string" use="optional" />
    <xs:anyAttribute namespace="##other" processContents="lax" />
  </xs:complexType>
  <xs:complexType name="ActivationProcess">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="tasks" type="ArrayOfTasks" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ArrayOfTasks">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="task" nillable="true" type="ActivationProcessorProviderData" />
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="YesNoBoolType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Yes" />
      <xs:enumeration value="No" />
      <xs:enumeration value="True" />
      <xs:enumeration value="False" />
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ManifestDownloaderProviderData">
    <xs:sequence>
      <xs:any processContents="skip" namespace="##any" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required" />
    <xs:anyAttribute processContents="skip" namespace="##any" />
  </xs:complexType>
  <xs:complexType name="ActivationProcessorProviderData">
    <xs:sequence>
      <xs:any processContents="skip" namespace="##any" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="type" type="xs:string" use="required" />
    <xs:attribute name="name" type="xs:string" />
    <xs:anyAttribute processContents="skip" namespace="##any" />
  </xs:complexType>
  <xs:complexType name="includedManifests">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="manifest" type="includedManifest" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="includedManifest">
    <xs:sequence>
    </xs:sequence>
    <xs:attribute name="location" type="xs:string" use="required" />
    <xs:attribute name="manifestId" type="xs:string" use="required" />
  </xs:complexType>
  <xs:complexType name="ConditionEvaluatorProviderData">
    <xs:sequence>
      <xs:any minOccurs="0" processContents="skip" namespace="##any" maxOccurs="unbounded" />
    </xs:sequence>
    <xs:attribute name="type" type="xs:string" />
    <xs:attribute name="name" type="xs:string" />
    <xs:anyAttribute processContents="skip" namespace="##any" />
  </xs:complexType>
  <xs:complexType name="ArrayOfConditions">
    <xs:sequence>
      <xs:element name="condition" type="ConditionEvaluatorProviderData" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ConditionEvaluation">
    <xs:sequence>
      <xs:element name="conditions" type="ArrayOfConditions" />
    </xs:sequence>
  </xs:complexType>
</xs:schema>